package com.itheima.commons;

/**
 * @Description:
 * @Version: V1.0
 */
public class Result<T> {
    //操作状态码
    private Integer code;
    //数据
    private T data;
    //提示消息
    private String message;

    public Result() {
    }

    //状态码,提示消息
    public Result(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    //数据和提示消息
    public Result(T data, String message) {
        this.data = data;
        this.message = message;
    }
    //提示消息
    public Result(String message) {
        this.message = message;
    }
    //全参
    public Result(Integer code, T data, String message) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
